<body>
<script type="text/javascript" src="<{$config.weburl}>/templates/wap/js/list/swiper.min.js"></script>
<link type="text/css" href="<{$config.weburl}>/templates/wap/new_css/gm_base.css" rel="stylesheet" />
<script type="text/javascript" src="http://api.map.baidu.com/api?v=1.5&ak=789d90b5c5f6ee42e720823baef00693"></script>
<script type="text/javascript" src="http://api.map.baidu.com/library/SearchInfoWindow/1.5/src/SearchInfoWindow_min.js"></script>
<link rel="stylesheet" href="http://api.map.baidu.com/library/SearchInfoWindow/1.5/src/SearchInfoWindow_min.css" />
<header>
    <div class="header_top sys_header">
        <div class="st_back"><a href="javascript:;" onclick="javascript:history.go(-1);"></a></div>
        <h1 class="tit">场馆详情</h1>
        <{include file="detail_header.htm"}>
    </div>
</header>

 <section>
  <div class="mid_content">
      <div data-am-widget="slider" class="am-slider am-slider-default" data-am-slider='{}' >
        <ul class="am-slides">
                          <li>
                              <img src="<{$info.picurl}>">
                          </li>
                    </ul>
      </div><!--轮播图-->

      <div class="line_show_top">
      <p class="tit"><{$info.spot_name}></p>
      <p class="txt"><{$info.tel}></p>
     <p class="txt"><{$info.address}></p>
      </div>
  <!--顶部介绍-->

  <!--产品信息-->
        <div class="line_tablist_box">
            <div class="bt_tit"><span>场馆介绍</span></div>
            <div class="cont_nr">
                <{$info.content}>
                  </div>
        </div>

 <div class="line_tablist_box">
            <div class="bt_tit"><span>场馆地图</span></div>
            <div class="cont_nr">

<div id="allmap" style="min-width:320px; max-width:640px; height:400px;"></div>

                <script type="text/javascript">
                    // 百度地图API功能
                    var BMapLib;
                    var map = new BMap.Map('allmap');
                    var poi = new BMap.Point("<{$lat_lng.lng}>","<{$lat_lng.lat}>");
                    map.centerAndZoom(poi, 16);
                    map.enableScrollWheelZoom();
                    var content = '<div style="margin:0;line-height:20px;padding:2px;">' +
                            '<img src="<{$de.picurl}>" alt="" style="float:right;zoom:1;overflow:hidden;width:100px;height:100px;margin-left:3px;"/>' +
                            '地址："<{$de.address}>"<br/>"<{$de.tel}>"<br/>' +
                            '</div>';
                    //创建检索信息窗口对象
                    var searchInfoWindow = null;
                    searchInfoWindow = new BMapLib.SearchInfoWindow(map, content, {
                        title  : "<{$de.spot_name}>",      //标题
                        width  : 290,             //宽度
                        height : 105,              //高度
                        panel  : "panel",         //检索结果面板
                        enableAutoPan : true,     //自动平移
                        searchTypes   :[
                            BMAPLIB_TAB_SEARCH,   //周边检索
                            BMAPLIB_TAB_TO_HERE,  //到这里去
                            BMAPLIB_TAB_FROM_HERE //从这里出发
                        ]
                    });

                    var marker = new BMap.Marker(poi); //创建marker对象
                    marker.enableDragging(); //marker可拖拽
                    marker.addEventListener("click", function(e){
                        searchInfoWindow.open(marker);
                    })
                    map.addOverlay(marker); //在地图中添加marker
                    marker.setAnimation(BMAP_ANIMATION_BOUNCE); //跳动的动画
                    opensearchInfoWindow(searchInfoWindow,poi);

                    function opensearchInfoWindow() {
                        searchInfoWindow.open(marker);
                    }
                    // 添加带有定位的导航控件
                    var navigationControl = new BMap.NavigationControl({
                        // 靠左上角位置
                        anchor: BMAP_ANCHOR_TOP_LEFT,
                        // LARGE类型
                        type: BMAP_NAVIGATION_CONTROL_LARGE,
                        // 启用显示定位
                        enableGeolocation: true
                    });
                    map.addControl(navigationControl);
                    // 添加定位控件
                    var geolocationControl = new BMap.GeolocationControl();
                    geolocationControl.addEventListener("locationSuccess", function(e){
                        // 定位成功事件
                        var address = '';
                        address += e.addressComponent.province;
                        address += e.addressComponent.city;
                        address += e.addressComponent.district;
                        address += e.addressComponent.street;
                        address += e.addressComponent.streetNumber;
                        alert("当前定位地址为：" + address);
                    });
                    geolocationControl.addEventListener("locationError",function(e){
                        // 定位失败事件
                        alert(e.message);
                    });
                    map.addControl(geolocationControl);
                </script>

            </div>
        </div>
    </div>
  </section>
<script>
    var mySwiper = new Swiper('.swiper1',{
        pagination: '.pagination',
        paginationClickable: true,
        slidesPerView: 'auto',
        autoplay:3000
    })

</script>
